<!DOCTYPE html>
<html>
<head>
    <include file="public/public_css" />
    <link rel="stylesheet" href="__PUBLIC__/static/css/menu.css">
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">

    <include file="public/header-min" />
    <!-- Left side column. contains the logo and sidebar -->
    <include file="public/left" />
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                系统设置
                <a href="javascript:void(0);" onclick="addAdmin();"><button type="button" class="btn btn-primary">添加管理员</button></a>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i>系统设置</a></li>
                <li class="active">网站设置</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <!-- Small boxes (Stat box) -->
            <div class="row">
                <form id="myForm" class="form-horizontal">
                    <div class="form-group">
                        <label for="input1" class="col-sm-2 control-label">网站名称</label>
                        <div class="col-sm-10">
                            <input name="title" type="text" class="form-control" id="input1" value="{$info.title}" placeholder="网站名称">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input2" class="col-sm-2 control-label">网站关键字</label>
                        <div class="col-sm-10">
                            <input name="key_word" type="text" class="form-control" id="input2" value="{$info.key_word}"  placeholder="网站关键字">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input3" class="col-sm-2 control-label">网站描述</label>
                        <div class="col-sm-10">
                            <input name="description" type="text" class="form-control" id="input3" value="{$info.description}" placeholder="网站描述">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input4" class="col-sm-2 control-label">联系电话</label>
                        <div  class="col-sm-10">
                            <input name="phone" type="text" class="form-control" id="input4" value="{$info.phone}" placeholder="联系电话">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input5" class="col-sm-2 control-label">传真</label>
                        <div  class="col-sm-10">
                            <input name="fix" type="text" class="form-control" id="input5" value="{$info.fix}" placeholder="传真">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input7" class="col-sm-2 control-label">联系人</label>
                        <div  class="col-sm-10">
                            <input name="person" type="text" class="form-control" id="input7" value="{$info.person}" placeholder="联系人">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input8" class="col-sm-2 control-label">手机号码</label>
                        <div  class="col-sm-10">
                            <input name="mobile" type="text" class="form-control" id="input8" value="{$info.mobile}" placeholder="手机号码">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input9" class="col-sm-2 control-label">QQ客服1</label>
                        <div  class="col-sm-10">
                            <input name="qq" type="text" class="form-control" id="input9"  value="{$info.qq}" placeholder="QQ客服1">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input10" class="col-sm-2 control-label">QQ客服2</label>
                        <div  class="col-sm-10">
                            <input name="qq2" type="text" class="form-control" id="input10"  value="{$info.qq2}" placeholder="QQ客服2">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input15" class="col-sm-2 control-label">邮箱</label>
                        <div  class="col-sm-10">
                            <input name="email" type="text" class="form-control" id="input15"  value="{$info.email}" placeholder="企业邮箱">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input14" class="col-sm-2 control-label">联系地址</label>
                        <div  class="col-sm-10">
                            <input name="address" type="text" class="form-control" id="input14"  value="{$info.address}" placeholder="公司地址">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input11" class="col-sm-2 control-label">版权所有者</label>
                        <div  class="col-sm-10">
                            <input name="copyright" type="text" class="form-control" id="input11" value="{$info.copyright}"  placeholder="版权所有者">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input12" class="col-sm-2 control-label">ICP备案号</label>
                        <div  class="col-sm-10">
                            <input name="ipc" type="text" class="form-control" id="input12" value="{$info.ipc}" placeholder="ICP备案号">
                        </div>
                    </div>

                    <div class="menu_btn">
                        <button  type="submit" class="btn btn-success" >提交</button>
                    </div>
                </form>
            </div>
        </section>
        <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->
    <include file="public/footer" />

    <!-- Control Sidebar -->

    <!-- /.control-sidebar -->
    <!-- Add the sidebar's background. This div must be placed
         immediately after the control sidebar -->
    <div class="control-sidebar-bg"></div>
</div>
<!-- ./wrapper -->

<include file="public/public_js" />
<script src="__PUBLIC__/static/js/jquery.form.js"></script>
<script>
    //添加管理员
    function addAdmin(){
        layer.open({
            type: 2,
            area: ['750px', '550px'],
            fixed: false, //不固定
            maxmin: true,
            content: '{$Think.WEB_PATH}/Admin/Admin/addAdmin'
        });
    }
    $('#myForm').submit(function () {
        $(this).ajaxSubmit({
            type : 'POST', //GET,POST
            url: '{$Think.WEB_PATH}/Admin/Admin/webSet?id='+{$info['id']},
            dataType : 'json', //xml,json,script，默认为null
            success : function (data) {
                layer.open({
                    type: 1,
                    time: 1000,
                    area: ['200px', '200px'],
                    content: data.msg //服务器返回的消息
                });
            },
            error : function (event, errorText, errorType) { //错误时调用
                alert(errorText + errorType);
            }
        });
        return false;
    });
</script>
</body>
</html>
